package com.core.shared;

import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousSocketChannel;

/**
 * Created with IntelliJ IDEA.
 * User: lxf
 * Date: 2016/3/18
 * Time: 15:45
 * To change this template use File | Settings | File Templates.
 */
public class AIOClient {

    public static void main(String... args) throws Exception {
        AsynchronousSocketChannel client = AsynchronousSocketChannel.open();
        client.connect(new InetSocketAddress("localhost", 9888));
        client.write(ByteBuffer.wrap("testAIOContent".getBytes())).get();
    }


}
